﻿using UnityEngine;
using System.Collections;

public class controller : MonoBehaviour {
	public int[,] puzzle= new int[8,8];//0=nada 1=pared horizontal 2=pared vertical..
	public int nivel;
	public bool turno;//true= usuario false = paco

	public int posxPreso;
	public int posyPreso;

	public int posxPaco;
	public int posyPaco;

	public GameObject plane;
	public int width=8;
	public int height=8;
	GameObject gridplane;
	public GameObject[,] Grid= new GameObject[8,8];

	void Awake(){
		for (int i =0; i<width; i++) {
			for(int j=0;j<height;j++){
				gridplane= (GameObject)Instantiate(plane);
				gridplane.transform.position=new Vector3(gridplane.transform.position.x+i,
				                                         gridplane.transform.position.y,
				                                         gridplane.transform.position.z+j);
				Grid[i,j]=gridplane;
			}
		}
	}
	// Use this for initialization
	void Start () {//definir los mapas
		Destroy (Grid [0, 3]);
		for (int i=0; i<width; i++) {
			for (int j=0; j<height; j++) {
				puzzle[i,j]=0;
			}
		}
		switch (nivel) {
		case 1:
			break;
		case 2:
			break;
		case 3:
			break;
		case 4:
			break;
		case 5:
			break;
		case 6:
			break;
		case 7:
			break;
		case 8:
			break;
		case 9:
			break;
		default:
			break;
		}
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
